GUI Help > Special > treeViewItemFromPoint

treeViewItemFromPoint
handle item=treeViewItemFromPoint(handle gadget, int x, int y)

Description:
Retrives the handle of the treeview item at the specified position. This can be useful if you wanted to implement drag & drop functionality for example. For example, if you had a treeview gadget called myTree, you could find out which item was under the mouse using this code:
handle=treeViewItemFromPoint(myTree,mousePosX(myTree),mousePosY(myTree))


Return Value:
Handle of item at specified point

Parameters:
gadget Handle of a treeview gadget
x X co-ordinate of the point you want to test, this is relative to the top-left of the treeview.
y Y co-ordinate of the point to test, relative to the top-left of the treeview gadget.
Remarks:


See Also:


Example:
(Note: You will need to include the GUI constants file for this example to work)